package com.example.novelweb.service;

import com.example.novelweb.model.entity.User;
import com.example.novelweb.model.vo.NovelVO;
import com.example.novelweb.model.vo.UserVO;

import java.util.List;

public interface RedisService {
  void setVarifyCode(String account, String code);
  String getVarifyCode(String account);
  void delVarifyCode(String account);
  String saveUserOrRefreshToken(String account, User user);
  boolean delToken(String token);
  boolean updateUser(String token,String field, String value);
  boolean updateUser(String token, UserVO userVO);


  void incrNovelCollectNum(Long novelId);
  void decrNovelCollectNum(Long novelId);

  void incrCommentLikeNum(Long commentId);
  void decrCommentLikeNum(Long commentId);

  void setCacheTopCollects(List<NovelVO> items);

  List<NovelVO> getCacheTopCollects();

  boolean hasCacheTopCollects();


}
